package com.mmy.service.car.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.mmy.dao.car.TCarOrgRepository;
import com.mmy.domain.car.TCarOrg;
import com.mmy.service.car.TCarOrgService;

@Service
public class TCarOrgServiceImpl implements TCarOrgService {
	
	@Autowired
	TCarOrgRepository tCarOrgRepository;

	/**
	 * 查找全部
	 * 
	 * @param
	 * @return
	 */
	public List<TCarOrg> findAll() {
		// TODO Auto-generated method stub
		return tCarOrgRepository.findAll();
	}

	/**
	 * 获取最大值
	 * 
	 * @param
	 * @return
	 */
	public Object getMaxOrgID() {
		// TODO Auto-generated method stub
		return tCarOrgRepository.getMaxOrgID();
	}

	/**
	 * 根据名称查找
	 * 
	 * @param
	 * @return
	 */
	public List<TCarOrg> findByOrgName(String strOrgName) {
		// TODO Auto-generated method stub
		return tCarOrgRepository.findByOrgName(strOrgName);
	}

	/**
	 * 新增
	 * 
	 * @param
	 * @return
	 */
	public void save(TCarOrg tCarOrg) {
		// TODO Auto-generated method stub
		tCarOrgRepository.save(tCarOrg);
	}

	/**
	 * 删除
	 * 
	 * @param
	 * @return
	 */
	public void delCarOrg(List<Integer> lstOrgID) {
		// TODO Auto-generated method stub
		tCarOrgRepository.delCarOrg(lstOrgID);
	}

	/**
	 * 通过id查找
	 * 
	 * @param
	 * @return
	 */
	public TCarOrg findByOrgID(int iOrgID) {
		// TODO Auto-generated method stub
		return tCarOrgRepository.findByOrgID(iOrgID);
	}


	/**
	 * 新建id
	 * 
	 * @param
	 * @return
	 */

	public void save(int orgID) {
		// TODO Auto-generated method stub
		tCarOrgRepository.save(orgID);
	}

}
